#include "gui/objects/GUIRouteCar.h"

namespace gui {

GUIRouteCar::GUIRouteCar(GUIObjectDrawer* drawer, map::Car* car, MapPoint nextPointToNavigate) :
factory(drawer) {
	if (car->getPosition() != nextPointToNavigate) {
		this->addObjectToContainer(this->factory.createGUIRouteIntersection(nextPointToNavigate));
		this->addObjectToContainer(this->factory.createGUIRouteArrow(car->getPosition(), nextPointToNavigate));
		this->addObjectToContainer(this->factory.createGUIRouteSegment(car->getPosition(), nextPointToNavigate));
	}
	this->addObjectToContainer(this->factory.createGUICar(car));
}

GUIRouteCar::~GUIRouteCar() {

}

}
